<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/template.xhtml">
	<ui:define name="content">
			<h:form>
				<div class="middle" style="color: #990033;"><b>
					Measure units handler</b>
				</div>
				<hr />
				<h:panelGrid class="panelGrid">
				<h:dataTable id="tabelMU" class="table" border="1"
					value="#{editMeasureunitsBean.listaMU}" var="dataItem">
					<h:column>
						<f:facet name="header">
						<h:outputText value="#{msg.OM_editmeasure_name}"> </h:outputText> </f:facet>
						<h:outputText value="#{dataItem.name}"></h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">
						<h:outputText value="#{msg.OM_editmeasure_delete}"> </h:outputText></f:facet>
						<h:commandButton class="trashBtn" value="#{dataItem.id}" render="tabelMU"
							actionListener="#{editMeasureunitsBean.performDelete}"
							onclick="#{msg.OM_editmeasure_confirmationMessage}">
							<f:attribute name="deleteMU" value="#{dataItem}" />
						</h:commandButton>
					</h:column>
				</h:dataTable>

				<h:panelGrid border="1" columns="1">
					<h:outputText style="color:blue; margin-left:80px;" value="#{msg.OM_editmeasure_measurename}" class="middle"></h:outputText>
					<h:inputText value="#{editMeasureunitsBean.nameMU}"></h:inputText>
					<div class="middle">
					<h:commandButton style="margin-left:100px;" class="button" value="#{msg.OM_editmeasure_save}" render="tabelMU"
						actionListener="#{editMeasureunitsBean.insertMeasureunitDTO}"
						onclick="#{msg.OM_editmeasure_confirmationMessage2}">
					</h:commandButton>
				</div>
				</h:panelGrid>
				
				</h:panelGrid>
			</h:form>
	</ui:define>
</ui:composition>
</html>